<template>
  <div class="show">
    <button @click="changeMode">{{ mode }}</button>
    当前单词：<input>
  </div>
</template>


<script>
import {ref} from 'vue'
export default {
    name:'Show',
    setup(){
      let mode = ref('英译汉')

      function changeMode(){
 
        mode.value = mode.value === '英译汉'?'汉译英':'英译汉'
      }

      return{
        mode,
        changeMode
      }
    }

}
</script>

<style scoped>
  .show{
    margin: 5px;
    height: 50px;
    width: 80%;
    text-align: center;
    line-height: 50px;
  }
</style>